package com.allinfinance.starters.xml.loader.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.io.Resource;

/**
 * @desc: 简单流程yml的自定义属性
 * @author: wujp
 * @create: 2025-01-02 19:20
 */
@ConfigurationProperties(prefix = "xml.loader")
public class XmlLoaderAutoProperties {

    /**
     * 文件配置资源路径
     */
    private Resource[] localFileResources;

    /**
     * 行注释字符，已这个开头的行内容会忽略加载
     */
    private String note = "<!--";

    /**
     * 配置文件后缀
     */
    private String suffix = ".xml";

    /**
     * 配置文件的默认编号格式
     */
    private String fileEncoding = "UTF-8";

    /**
     * 是否含有数据库的配置资源
     */
    private Boolean hasDbResources = false;

    /**
     * 含有数据库配置时，资源配置的表名
     */
    private String configTableName;

    /**
     * 含有数据库配置时，资源配置的主键字段名
     */
    private String configKeyFieldName;

    /**
     * 含有数据库配置时，资源配置的具体资源值字段名
     */
    private String configValueFieldName;

    public Resource[] getLocalFileResources() {
        return localFileResources;
    }

    public void setLocalFileResources(Resource[] localFileResources) {
        this.localFileResources = localFileResources;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public String getFileEncoding() {
        return fileEncoding;
    }

    public void setFileEncoding(String fileEncoding) {
        this.fileEncoding = fileEncoding;
    }

    public Boolean getHasDbResources() {
        return hasDbResources;
    }

    public void setHasDbResources(Boolean hasDbResources) {
        this.hasDbResources = hasDbResources;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public String getConfigTableName() {
        return configTableName;
    }

    public void setConfigTableName(String configTableName) {
        this.configTableName = configTableName;
    }

    public String getConfigKeyFieldName() {
        return configKeyFieldName;
    }

    public void setConfigKeyFieldName(String configKeyFieldName) {
        this.configKeyFieldName = configKeyFieldName;
    }

    public String getConfigValueFieldName() {
        return configValueFieldName;
    }

    public void setConfigValueFieldName(String configValueFieldName) {
        this.configValueFieldName = configValueFieldName;
    }
}
